﻿using Admin.NET.Core;
using Admin.NET.Application.Entity;

namespace Admin.NET.Application.SeedData;

/// <summary>
/// 学科 表种子数据
/// </summary>
public class XuekeSeedData: ISqlSugarEntitySeedData<Xueke>
{
    /// <summary>
    /// 种子数据
    /// </summary>
    /// <returns></returns>
    public IEnumerable<Xueke> HasData()
    {
        string recordsJSON = @"
            [
			  {
			    ""Code"": ""01"",
			    ""Name"": ""语文"",
			    ""ShortName"": ""语"",
			    ""Enable"": true,
			    ""IsMain"": true,
			    ""SortIndex"": null,
			    ""Remark"": null,
			    ""CreateUserName"": ""超级管理员"",
			    ""UpdateUserName"": ""超级管理员"",
			    ""CreateTime"": ""2023-12-22 14:45:59"",
			    ""UpdateTime"": ""2023-12-22 14:46:09"",
			    ""CreateUserId"": 1300000000101,
			    ""UpdateUserId"": 1300000000101,
			    ""IsDelete"": false,
			    ""Id"": 30991963373381
			  },
			  {
			    ""Code"": ""02"",
			    ""Name"": ""数学"",
			    ""ShortName"": ""数"",
			    ""Enable"": true,
			    ""IsMain"": true,
			    ""SortIndex"": null,
			    ""Remark"": null,
			    ""CreateUserName"": ""超级管理员"",
			    ""UpdateUserName"": null,
			    ""CreateTime"": ""2023-12-22 14:46:28"",
			    ""UpdateTime"": null,
			    ""CreateUserId"": 1300000000101,
			    ""UpdateUserId"": null,
			    ""IsDelete"": false,
			    ""Id"": 30991970708037
			  },
			  {
			    ""Code"": ""03"",
			    ""Name"": ""英语"",
			    ""ShortName"": ""英"",
			    ""Enable"": true,
			    ""IsMain"": true,
			    ""SortIndex"": null,
			    ""Remark"": null,
			    ""CreateUserName"": ""超级管理员"",
			    ""UpdateUserName"": null,
			    ""CreateTime"": ""2023-12-22 14:46:46"",
			    ""UpdateTime"": null,
			    ""CreateUserId"": 1300000000101,
			    ""UpdateUserId"": null,
			    ""IsDelete"": false,
			    ""Id"": 30991975487557
			  },
			  {
			    ""Code"": ""04"",
			    ""Name"": ""科学"",
			    ""ShortName"": ""科"",
			    ""Enable"": true,
			    ""IsMain"": true,
			    ""SortIndex"": null,
			    ""Remark"": null,
			    ""CreateUserName"": ""超级管理员"",
			    ""UpdateUserName"": null,
			    ""CreateTime"": ""2023-12-22 14:47:05"",
			    ""UpdateTime"": null,
			    ""CreateUserId"": 1300000000101,
			    ""UpdateUserId"": null,
			    ""IsDelete"": false,
			    ""Id"": 30991980206405
			  },
			  {
			    ""Code"": ""05"",
			    ""Name"": ""社会"",
			    ""ShortName"": ""社"",
			    ""Enable"": true,
			    ""IsMain"": true,
			    ""SortIndex"": null,
			    ""Remark"": null,
			    ""CreateUserName"": ""超级管理员"",
			    ""UpdateUserName"": null,
			    ""CreateTime"": ""2023-12-22 14:49:28"",
			    ""UpdateTime"": null,
			    ""CreateUserId"": 1300000000101,
			    ""UpdateUserId"": null,
			    ""IsDelete"": false,
			    ""Id"": 30992016965189
			  }
			]
        ";
        List<Xueke> records = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Xueke>>(recordsJSON);
        
        // 后处理数据的特殊字段
		//for (int i = 0; i < records.Count; i++) { }

        return records;
    }
}